package cn.xmoit.sample.spring.security.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fangyy
 */
@RestController
public class IndexController {

	@RequestMapping({ "", "/" })
	public String welcome() {
		return "Welcome to the home page!";
	}

	@RequestMapping("/hello")
	public String hello() {
		return "Hello World!";
	}

	@RequestMapping("/remember-me")
	public String rememberMe() {
		return "Remember Me.";
	}

	@GetMapping("/admin/info")
	public String adminInfo() {
		return "Admin Info.";
	}

	@GetMapping("/api/info")
	public String apiInfo() {
		return "Accessing API.";
	}

}
